﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
using YAPL.Language.SourceParser;
using YAPL.Util;

namespace YAPL.Test.YAPL.Util {
	public class TypeHelperTest {
		[Fact]
		public void InputParserShouldBeInstantiatedWithoutErrors() {
			var inputInfo = new InputInfo("test.txt");
			object inputParser = null;
			Assert.DoesNotThrow(() => inputParser = TypeHelper.CreateType<InputParser>("YAPL.Language.Parser",
				"YAPL.Language.SourceParser.XML.XmlInputParser", inputInfo));
			Assert.NotNull(inputParser);
			Assert.IsAssignableFrom(typeof(InputParser), inputParser);
		}
	}
}